package com.company.project.authorization.client;

import java.util.Properties;

import swingxrcp.framework.client.action.ActionFacade;
import swingxrcp.framework.client.application.Application;
import swingxrcp.framework.model.Action;

import com.company.project.authorization.domain.User;

public class ClientTest extends Application{

	public static void main(String[] args) {
		// 初始化传输器
		Properties properties = new Properties();
		properties.setProperty("server.host", "localhost");
		properties.setProperty("server.port", "80");
		properties.setProperty("server.context", "swingxrcpdemo");
		properties.setProperty("server.suffix", "data");
		ActionFacade.init(properties);

		// 传输测试
		User params = new User();
		params.setUsername("liangfei");
		params.setPassword("123456");
		Action loginAction = ActionFacade.getAction("loginAction");
		User result = (User)loginAction.execute(params);
		System.out.println(result.getEmail());
	}

}
